//
//  EditCardDetailsController.h
//  DiscountClub
//
//  Created by Philip Chew on 28/2/12.
//  Copyright (c) 2012 articwind@gmail.com. All rights reserved.
//

#import <UIKit/UIKit.h>
@protocol EditCardDetailState <NSObject>
@required
@property (nonatomic, retain) NSString *title;

- (void)setControlStateForName:(UITextField *) txtName;
- (void)setControlStateForCardNo:(UITextField *) txtCardNo;
- (void)setControlStateForCompany:(UITextField *) txtCompany;
- (void)setControlStateForFrontImage:(UIButton *) btnCardFront;
- (void)setControlStateForBackImage:(UIButton *) btnCardBack;
	
@end

@interface EditCardDetailsController : UIViewController<UIPickerViewDelegate, 
	UIPickerViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate> {
	UITextField *txtName;
	UITextField *txtCardNo;
	UITextField *txtCompany;
	UIButton *btnCardFront;
	UIButton *btnCardBack;
	UIButton *selectedButton;	
	id<EditCardDetailState> uiState;
	NSMutableArray *companies;
}

@property (nonatomic, retain) IBOutlet UITextField *txtName;
@property (nonatomic, retain) IBOutlet UITextField *txtCardNo;
@property (nonatomic, retain) IBOutlet UITextField *txtCompany;

- (id) initWithEditCardDetailState:(id<EditCardDetailState> ) state;
- (IBAction)onClick_cardFront;
- (IBAction)onClick_cardBack;
- (IBAction)onClick_save;
- (void)displayPictureOptions;

@end
